Hi
I have a problem to run a DXL script as a scheduled task. The problem is the creation of the application object of Excel.
xl = oleCreateAutoObject("Excel.Application")
This will fail, and return null, when the script is run as a scheduled task and I am not logged in. If I am logged in everything works as expected.
Has anyone else experienced this problem or is it something with our environment?
/Anders
a_vestlin - Mon Apr 04 03:32:07 EDT 2011 |
|
Re: Scheduled task: Excel error SystemAdmin - Mon Apr 04 09:06:21 EDT 2011
When you run the script as a scheduled task it is not run with your account but with System account. The system account might not have rights to access Excel OLE properties - depends on your Windows version and configuration.
In a similar situation on Windows server I used the dcomcnfg application to change access rights to Microsoft Excel components. Sorry, but not anymore remember what and how ... but maybe you can get help from Internet sites on dcomcnfg and from IT support.
"over my head and out of my field"
|
|
Re: Scheduled task: Excel error a_vestlin - Mon Apr 04 10:49:43 EDT 2011 SystemAdmin - Mon Apr 04 09:06:21 EDT 2011
When you run the script as a scheduled task it is not run with your account but with System account. The system account might not have rights to access Excel OLE properties - depends on your Windows version and configuration.
In a similar situation on Windows server I used the dcomcnfg application to change access rights to Microsoft Excel components. Sorry, but not anymore remember what and how ... but maybe you can get help from Internet sites on dcomcnfg and from IT support.
"over my head and out of my field"
Thanks for your suggestion, but it does not explain why the task will work when I am logged in (I do not start the task, it is scheduled to be run as me). I suspect it has to do with our security policy.
/Anders
|
|
Re: Scheduled task: Excel error Mathias Mamsch - Mon Apr 04 11:41:22 EDT 2011 a_vestlin - Mon Apr 04 10:49:43 EDT 2011
Thanks for your suggestion, but it does not explain why the task will work when I am logged in (I do not start the task, it is scheduled to be run as me). I suspect it has to do with our security policy.
/Anders
Hmm you did not accidently check the option "Run only if logged on", did you? You might want to check the task properties for that. Regards, Mathias
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
|
Re: Scheduled task: Excel error a_vestlin - Tue Apr 05 02:18:45 EDT 2011 Mathias Mamsch - Mon Apr 04 11:41:22 EDT 2011
Hmm you did not accidently check the option "Run only if logged on", did you? You might want to check the task properties for that. Regards, Mathias
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
No, I could run the task if I changed the code to create an msxml object instead:
doc = oleCreateAutoObject("Msxml2.DOMDocument.3.0")
The problem seems to be Excel.
|
|
Re: Scheduled task: Excel error ChG - Fri Jan 17 03:28:15 EST 2014
I ran into a similar problem today, which was solved by setting the scheduled to "run with highest privileges".
|
|